<%@page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.qidian.common.beans.AccountBean"%>
<%@page import="com.qidian.common.beans.UserBean"%>
<%@page import="com.qidian.util.*"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	PageList pageList = (PageList)request.getAttribute("pageList");
	List<AccountBean> listAccount = (List<AccountBean>)pageList.getList();
	int leftPoint = ((UserBean)request.getSession().getAttribute("user")).getLeftPoint();

%>
<h3>子账号列表</h3>
   <table cellpadding="0" cellspacing="0">
	<tr>
		<td>注册码</td>
		<td>生成日期</td>
		<td>有效期</td>
		<td>原始点数</td>
		<td>余额</td>
		<td class="action">操作</td>
	</tr>
<%
int i = 0 ; 
for(AccountBean accountBean:listAccount)
{i++;
%>	
<tr <%= i%2==0?"":"class=\"odd\""%> >
	<td><%=accountBean.getMaskCode() %></td>
	<td><%=new Date(accountBean.getBirthTime()).toLocaleString() %></td>
	<td><%=new Date(accountBean.getLastTime()).toLocaleString() %></td>
	<td><%=accountBean.getPoint() %></td>
	<td><%=accountBean.getLeftPoint() %></td>
	<td class="action"><a href="#" class="edit">Edit</a><a href="#" class="delete">Delete</a></td>
</tr>
<%
}
%>
</table>